diff --git a/modules/node/node.module b/modules/node/node.module
index c70f3aa0beec32047a3b1f9f150884f07720337f..8113c6cdde45b4fbe160c1e162b10945abe0c3a3 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2351,12 +2351,13 @@ function node_delete_confirm($node) {
 /**
  * Execute node deletion
  */
-function node_delete_confirm_submit($form_id, $form_values) {
+function node_delete_confirm_submit($form_values, $form, &$form_state) {
   if ($form_values['confirm']) {
     node_delete($form_values['nid']);
   }
 
-  return '<front>';
+  $form_state['redirect'] = '<front>';
+  return;
 }
 
 /**
diff --git a/modules/search/search.module b/modules/search/search.module
index ebe2ac7f18ca74725816957a5557375c157771c9..af9d0e80f3993db9e2fe9c31e75c5dcefdd61edb 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -1045,7 +1045,7 @@ function search_form($action = '', $keys = '', $type = NULL, $prompt = NULL) {
  * value for the basic search form.
  */
 function search_form_validate($form_values, $form, &$form_state) {
-  form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys'], $form_state));
+  form_set_value($form['basic']['inline']['processed_keys'], trim($form_values['keys']), $form_state);
 }
 
 /**
@@ -1089,6 +1089,7 @@ function search_box($form_id) {
  * Process a block search form submission.
  */
 function search_box_form_submit($form_values, $form, &$form_state) {
+  $form_id = $form['form_id']['#value'];
   $form_state['redirect'] = 'search/node/'. trim($form_values[$form_id .'_keys']);
   return;
 }