diff --git a/entityreference_browser.js b/entityreference_browser.js
index fc1ccbb..4943193 100644
--- a/entityreference_browser.js
+++ b/entityreference_browser.js
@@ -90,6 +90,7 @@
 		init: function(element) {
 			// Initialize the browser once.
 			$('ul.entityreference-browser-selected', element).once('entityreference-browser-selected', function() {
+        // @TODO use the proper field-type- class. See browserUpdate.
 				var field = element.closest('.field-type-entityreference'),
 						hidden = field.find('input.entityreference-browser-values'),
 						values = hidden.val();
@@ -114,8 +115,10 @@
 		},
 
 		browserUpdate: function (event, ui) {
-			var items = [],
-					field = ui.item.closest('.field-type-entityreference');
+      var items = [],
+          instanceId = ui.item.attr('id'),
+          instanceSettings = Drupal.settings.entityreference_browser[instanceId];
+          field = ui.item.closest('.field-type-' + instanceSettings.field_type);
 
 			$(".entityreference-browser-selected li", field).each(function(index) {
 				items.push($(this).attr('data-id'));
diff --git a/entityreference_browser.module b/entityreference_browser.module
index 76df354..4de6065 100644
--- a/entityreference_browser.module
+++ b/entityreference_browser.module
@@ -197,6 +197,7 @@ function entityreference_browser_field_widget_form(&$form, &$form_state, $field,
   $settings = array(
     'entityreference_browser' => array(
       $element_id => array(
+        'field_type' => strtr($field['type'], '_', '-'),
         'cardinality' => $field['cardinality'],
       ),
     ),
