Fixed bug in smooth interpolation