diff --git a/hierarchical_select.js b/hierarchical_select.js
index 059fcc8..7878a55 100644
--- a/hierarchical_select.js
+++ b/hierarchical_select.js
@@ -564,7 +564,18 @@ Drupal.HierarchicalSelect.update = function(hsid, updateType, settings) {
       
       // Attach behaviors. This is just after the HTML has been updated, so
       // it's as soon as we can.
-      Drupal.attachBehaviors(Drupal.HierarchicalSelect.context);
+			try {
+        Drupal.attachBehaviors(Drupal.HierarchicalSelect.context);
+      }
+      catch (err){
+        // just ignoring the exception for this syntax error issue
+        if (/Syntax error, unrecognized expression/.test(err) == true){
+          console.log('Error attaching behaviors: "' + err + '"');
+        }
+        else{
+          throw(err);
+        }
+      }
 
       // Transform the hierarchical select and/or dropbox to the JS variant,
       // make it resizable again and re-enable the disabled form items.
