Fix undefined event, add check prior to delete

No match.