Bug in curvature computation