fix contours