Fix race condition on exit to menu