added a break when a mid is found with correct entity type