Fixed sorting for relationship column