Fix main menu click race condition