nullptr appears at endgame