Fixed error in arc sorter