Modified range statements in sorter unit to fix #7.