close dialog box if the game is over