fix undo, redo