Fixed issue with arc distance calculation.