Add minStep to smooth() function.