Array is not flowing along the curve?

I am using the flow component for a line, and the lines wont flow along the target curve. It does for a bit then just goes straight.

target curve is green, and the red lines are the ones im trying to ‘flow’

Attached is my script

Help.gh (86.7 KB)

This component flows your geometry from base curve to target curve. You’re not providing the base curve