Fix sorting of properties