Add handler for game end