The main menu dialog now correctly gets removed.