fix sorting for numeric values