improved undo for delete