Trying to fix undo/Redo