Fixed: Check if trigger, condition or action is used in an event before deleting.