fixed a bugg where the game would crash upon pressing quit game from the PauseMenuPanel