fix undo from end game