Implemented correct default sorting for all entities.