fix line intersections