Automatically find and fix problem contour lines