Solved, just added this to each line draw end routine:

c1=0
c2=0
c3=0
c4=0
c5=0