bug on intersect detection