diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index 8d0dcbe..b00aecc 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -22,9 +22,10 @@ Drupal.behaviors.autocomplete = function (context) {
  * and closes the suggestions popup when doing so.
  */
 Drupal.autocompleteSubmit = function () {
-  return $('#autocomplete').each(function () {
+  $('#autocomplete').each(function () {
     this.owner.hidePopup();
-  }).size() == 0;
+  }); // }).size() == 0;
+  return 1;
 };
 
 /**
@@ -281,7 +282,9 @@ Drupal.ACDB.prototype.search = function (searchString) {
         }
       },
       error: function (xmlhttp) {
-        alert(Drupal.ahahError(xmlhttp, db.uri));
+        if (!(xmlhttp.status == 0 && db.uri.match('xc_search/autocomplete'))) {
+          alert(Drupal.ahahError(xmlhttp, db.uri));
+        }
       }
     });
   }, this.delay);
