undo bug. remove last undo state after player loses