diff --git a/modules/search.module b/modules/search.module
index 8b7b5cdb71999bf4e7b5775f965017bde37d2079..6a43604d88b5b522859bb7638cf996f167ba17fe 100644
--- a/modules/search.module
+++ b/modules/search.module
@@ -128,10 +128,9 @@ function search_admin() {
   if ($_POST) {
     // If the word length settings change, the index needs to be rebuilt.
     if (variable_get('minimum_word_size', 3) != $_POST['edit']['minimum_word_size']) {
-      // Note: ensure logical order of messages
-      system_settings_save();
       drupal_set_message(t('The index will be rebuilt.'));
       search_wipe();
+      system_settings_save();
     }
     else {
       system_settings_save();
diff --git a/modules/search/search.module b/modules/search/search.module
index 8b7b5cdb71999bf4e7b5775f965017bde37d2079..6a43604d88b5b522859bb7638cf996f167ba17fe 100644
--- a/modules/search/search.module
+++ b/modules/search/search.module
@@ -128,10 +128,9 @@ function search_admin() {
   if ($_POST) {
     // If the word length settings change, the index needs to be rebuilt.
     if (variable_get('minimum_word_size', 3) != $_POST['edit']['minimum_word_size']) {
-      // Note: ensure logical order of messages
-      system_settings_save();
       drupal_set_message(t('The index will be rebuilt.'));
       search_wipe();
+      system_settings_save();
     }
     else {
       system_settings_save();