some fixes of the intersection algorithm
complete fixed intersection algorithm