fixed undo/redo