Fix a bug in Entities [filter()] procedure