Change bad_entities to valid_entities