Fix sorting order of addresses