Fix sorting of versions