Curve-line intersection fix