Fix undo redo