diff --git a/node_import.inc b/node_import.inc
index e67ad6a..0b86334 100644
--- a/node_import.inc
+++ b/node_import.inc
@@ -675,7 +675,7 @@ function node_import_values($type, $data, $map, $defaults, $options, $fields, $p
 
     // If empty values are not allowed, filter them out.
     if (!$fieldinfo['allow_empty']) {
-      $values[$fieldname] = array_filter((array)$values[$fieldname], 'drupal_strlen');
+      $values[$fieldname] = array_values( array_filter((array)$values[$fieldname], 'drupal_strlen') );
     }
 
     // Handle files specially. The preprocess function only returns
