diff --git a/conditional_fields.module b/conditional_fields.module
index 31c76ec..eb355ef 100644
--- a/conditional_fields.module
+++ b/conditional_fields.module
@@ -533,7 +533,7 @@ function conditional_fields_form_after_build($form, &$form_state) {
 
           // OR, NOT and XOR conditions are obtained with a nested array.
           foreach ($options['values'] as $value) {
-            $values[] = array($options['condition'] => $value);
+            $values[$options['condition']] = $value;
           }
         }
 
diff --git a/js/conditional_fields.js b/js/conditional_fields.js
index 9a737b0..68bf8eb 100644
--- a/js/conditional_fields.js
+++ b/js/conditional_fields.js
@@ -24,20 +24,6 @@ Drupal.states.Dependent.comparisons['Array'] = function (reference, value) {
 };
 
 /**
- * Handle Object values.
- */
-Drupal.states.Dependent.comparisons['Object'] = function (reference, value) {
-  /* Regular expressions are objects with a RegExp property. */
-  if (reference.hasOwnProperty('RegExp')) {
-    reference = new RegExp(reference.RegExp);
-    return this.RegExp(reference, value);
-  }
-  else {
-    return compare(reference, value);
-  }
-};
-
-/**
  * Focused condition.
  */
 Drupal.states.Trigger.states.focused = function(element) {
@@ -113,7 +99,7 @@ Drupal.behaviors.conditionalFields = {
       return;
     }
     // Override state change handlers for dependents with special effects.
-    $.each($(document).data('events'), function(i, e) {
+    $.each($._data( document, "events" ), function(i, e) {
       if (i.substring(0, 6) == 'state:') {
         var originalHandler = e[0].handler;
         e[0].handler = function(e) {
@@ -130,4 +116,4 @@ Drupal.behaviors.conditionalFields = {
   }
 };
 
-})(jQuery);
\ No newline at end of file
+})(jQuery);
