correct spline logic a little