Fix sorting of partitionleaders