Undo/Redo fix