Fix to getEntityType