fix smoothing bug for small numbers of points

Signed-off-by: Mark Histed <mhisted@gmail.com>