fixed a spline fitting issue