Fix sorting of remotes