Index: multiselect.module
===================================================================
--- multiselect.module	(revision 348)
+++ multiselect.module	(revision )
@@ -94,10 +94,16 @@
   //for each selected item ($items are in delta order still), we unset the item from $options (which is in nid/tid order)
   //then just re-append it to the bottom of the options array, in order of $items, this fools the FAPI and retains order on edit
   foreach ($items as $item) {
-    if (isset($options[$item['nid']])) {
-      $val = $options[$item['nid']];
-      unset($options[$item['nid']]);
-      $options[$item['nid']] = $val;
+    if (is_array($item)) {
+      $key = $item[$value_key];
+    }
+    else {
+      $key = $item;
+    }
+    if (isset($options[$key])) {
+      $value = $options[$key];
+      unset($options[$key]);
+      $options[$key] = $value;
     }
   }
 
