fix the sorter