Fix constant smoothing algorithm.