fixed a bug where the pause menu couldn't be closed.