Addresses submenu not closing issue.