Fixed bug with intersect