Better handling of delete event.