Fixed third-level submenu closing logic. Wow, such selectors