fixed some problems with the creating of intersections