Fix sorting negative numbers