fixed the undoing