fixed another undo related bug.