small bugfix in smoothing script