fixed segment intersect overflow error