--- search404.module    2009-06-23 14:57:37.000000000 -0400
+++ search404.module.new        2009-06-23 14:58:08.000000000 -0400
@@ -38,7 +38,7 @@ function search404_get_keys() {
   if (!empty($extensions) && preg_match("/\.($extensions)$/", $_REQUEST['destination'])) {
     return false;
   }
-  $keys = $_REQUEST['destination'];
+  $keys = $_REQUEST['destination'] ? $_REQUEST['destination'] : $_REQUEST['q'];
   $misc_var = variable_get('search404_regex', '');
   if (!empty($misc_var)) {
        $keys = preg_grep($misc_var, $keys);
