Fixed delete of entity types