Fix minor undo clear bug.