ordering fixed in parse_sort helper