diff --git a/groupmenu.module b/groupmenu.module
index c6e4eac..b22e696 100644
--- a/groupmenu.module
+++ b/groupmenu.module
@@ -10,6 +10,8 @@ use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Session\AccountInterface;
 use Drupal\gnode\Plugin\GroupContentEnabler\GroupNode;
+use Drupal\group\Entity\Group;
+use Drupal\group\Entity\GroupContent;
 use Drupal\group\Entity\GroupContentType;
 use Drupal\group\Entity\Form\GroupContentTypeForm;
 use Drupal\group\Entity\GroupInterface;
@@ -94,19 +96,28 @@ function groupmenu_form_alter(&$form, FormStateInterface $form_state, $form_id)
  */
 function groupmenu_form_node_form_alter(&$form, FormStateInterface $form_state) {
   $account = \Drupal::currentUser();
-  // Filter all menu options when we are adding content in a group, or if we
-  // don't have permissions to edit all menus.
-  /** @var \Drupal\group\Entity\GroupInterface $group */
-  $group = $form_state->getStorage()['group'];
-  if ($group || !$account->hasPermission('administer menu')) {
+  $node = $form_state->getFormObject()->getEntity();
+  // If a node is being edited at /node/%/edit, look for groups that it is a
+  // part of. If not, try to use the group ID from the URL.
+  if ($node->id()) {
+    $group_content_array = GroupContent::loadByEntity($node);
+    foreach ($group_content_array as $group_content) {
+      $groups[] = $group_content->gid->target_id;
+    }
+    $groups = Group::loadMultiple($groups);
+  }
+  elseif (isset($form_state->getStorage()['group'])) {
+    $groups[] = $form_state->getStorage()['group'];
+  }
+
+  if (isset($groups) || !$account->hasPermission('administer menu')) {
     $menu_options = &$form['menu']['link']['menu_parent']['#options'];
     if ($menu_options) {
-      $menu_exist = groupmenu_filter_parent_options($menu_options, $group);
+      $menu_exist = groupmenu_filter_parent_options($menu_options, $groups);
       if ($menu_exist) {
         // If we have access to menu options, this means we have permission to
         // edit the group menu.
         $form['menu']['#access'] = TRUE;
-        $form['menu']['link']['menu_parent']['#default_value'] = reset($menu_options);
       }
       else {
         $form['menu']['#access'] = FALSE;
@@ -120,16 +131,28 @@ function groupmenu_form_node_form_alter(&$form, FormStateInterface $form_state)
  *
  * @param array &$options
  *   Form options to filter.
- * @param \Drupal\group\Entity\GroupInterface $group
+ * @param \Drupal\group\Entity\GroupInterface[] $groups
  *   Optionally filter menus by group.
  *
  * @return bool
  *   FALSE if there is no allowed menu items,
  *   TRUE if we have some allowed menu items.
  */
-function groupmenu_filter_parent_options(array &$options, GroupInterface $group = NULL) {
+function groupmenu_filter_parent_options(array &$options, array $groups = []) {
+  $allowed_menus = [];
   $groupmenu_service = \Drupal::service('groupmenu.menu');
-  $allowed_menus = $group ? $groupmenu_service->loadUserGroupMenusByGroup('edit', $group->id()) : $groupmenu_service->loadUserGroupMenus('edit');
+  if (!empty($groups)) {
+    foreach($groups as $group) {
+      $allowed_menus_raw[] = $groupmenu_service->loadUserGroupMenusByGroup('edit', $group->id());
+    }
+    foreach ($allowed_menus_raw as $menu) {
+      $allowed_menus = array_merge($allowed_menus, $menu);
+    }
+  }
+  else {
+    $allowed_menus = $groupmenu_service->loadUserGroupMenus('edit');
+  }
+
   if (count($allowed_menus) && is_array($options)) {
     $option_keys = array_keys($options);
     foreach ($option_keys as $option_key) {
