Undo function.