Added end of game handling