diff --git a/modules/hs_menu.module b/modules/hs_menu.module
index 57442e8..0bbe368 100644
--- a/modules/hs_menu.module
+++ b/modules/hs_menu.module
@@ -33,7 +33,7 @@ function hs_menu_form_node_form_alter(&$form, &$form_state) {
   if (isset($form['menu']['link']['parent']) && $form['menu']['#access']) {
     unset($form['menu']['link']['parent']['#options']);
     $form['menu']['link']['parent']['#type'] = 'hierarchical_select';
-    _hs_menu_apply_config($form['menu']['link']['parent'], NULL);
+    _hs_menu_apply_config($form['menu']['link']['parent'], array('type' => $form['type']['#value']));

     // Set custom submit callback.
     array_unshift($form['#submit'], 'hs_menu_node_form_submit');
@@ -50,7 +50,10 @@ function hs_menu_form_menu_edit_item_alter(&$form, &$form_state) {
   unset($form['parent']['#options']);
   $original_item = $form['original_item']['#value'];
   $form['parent']['#type'] = 'hierarchical_select';
-  _hs_menu_apply_config($form['parent'], array($original_item['menu_name'], $original_item['mlid']));
+  _hs_menu_apply_config($form['parent'], array('exclude' => array(
+    $original_item['menu_name'],
+    $original_item['mlid'],
+  )));

   // Set custom submit callback.
   array_unshift($form['#submit'], 'hs_menu_menu_edit_item_form_submit');
@@ -123,8 +126,19 @@ function hs_menu_hierarchical_select_root_level($params) {
   $menus = array();

   $result = db_query("SELECT menu_name, title FROM {menu_custom} ORDER BY title");
-  while ($menu = $result->fetchObject()) {
-    $menus[$menu->menu_name . ':0'] = $menu->title;
+  // If the type is set, respect the core menu options setting.
+  if (isset($params['type'])) {
+    $type_menus = variable_get('menu_options_' . $params['type'], array('main-menu' => 'main-menu'));
+    while ($menu = $result->fetchObject()) {
+      if (in_array($menu->menu_name, $type_menus)) {
+        $menus[$menu->menu_name . ':0'] = $menu->title;
+      }
+    }
+  }
+  else { // Fall back to the legacy approach, show all menu's.
+    while ($menu = $result->fetchObject()) {
+      $menus[$menu->menu_name . ':0'] = $menu->title;
+    }
   }

   return $menus;
@@ -250,11 +264,12 @@ function _hs_menu_children($tree, $menu_name, $plid = 0, $exclude = FALSE) {
 /**
  * Helper function to apply the HS config to a form item.
  */
-function _hs_menu_apply_config(&$form, $exclude) {
+function _hs_menu_apply_config(&$form, $params) {
   $form['#config'] = array(
     'module' => 'hs_menu',
     'params' => array(
-      'exclude' => $exclude,
+      'exclude' => isset($params['exclude']) ? $params['exclude'] : NULL,
+      'type' => isset($params['type']) ? $params['type'] : NULL,
     ),
     'save_lineage'    => 0,
     'enforce_deepest' => 0,
