Fix line discontinuities