fixed a crash at getting intersections