Improve detection of tangent points