Fixed the bug that would display options menu in the middle of the game