Some long-standing bugs pertaining to menu opening and closing fixed