Undo changes in wrong place