Memory bug in smoothing operator