diff --git a/plugins/menu_item.inc b/plugins/menu_item.inc
index 0ff53c9..4cfdb84 100644
--- a/plugins/menu_item.inc
+++ b/plugins/menu_item.inc
@@ -36,6 +36,24 @@ function menu_item_export_alter(&$node, &$export) {
 }
 
 /**
+ * Handles a sort to insure that parent menu links are imported first.
+ */
+function menu_item_import_sort($a, $b) {
+  $a_children = $a->link['has_children'];
+  $b_children = $b->link['has_children'];
+
+  if (!empty($a_children) && empty($b_children)) {
+    return -1;
+  }
+  elseif (!empty($b_children) && empty($a_children)) {
+    return 1;
+  }
+  else {
+    return 0;
+  }
+}
+
+/**
  * Handles the importing of menu item after the node is loaded
  *
  * Convert the menu item path from machine to nid and save
