fix self intersect