fix global undo/redo behavior