fixed game end error