Fix end game issue