Entities are sorted properly now.