trying to fix undo