fix intersection test