Fix menu and auto-close