Fixed parallel sort, added loop process