FIX: wrong contour smoothing