fixed error handling in spline, fixes copy const. and assign. operator