fixed curve-smoothing bug