undooing bad code