modified a bit intersect function, tried to fix Target spawn