fix sort to not sort lexicographic