fixed the bug with bspline