Minor changes to the sorter.