fix bug on restarting the game