Duplicated curves

Hi guys, does anyone knows the best way to avoid this error? I keep getting multiple curves on the second branch of this list, and I don’t know how to avoid it, or else, how to delet them. Thank you!

duplicated curves_001.gh (14.0 KB)

duplicated curves_001_re.gh (8.2 KB)