Some changes to sort (stable_sort test)