Made geodesic distance more accurate