Fixed game crashing when game is over