Nav menus always remain closed after using back button