Fix delete event to use database workaround