fixed curvature bug