Ah ok I see, I was connecting the lines in the wrong order. I was drawing all the lines in the same direction, but I had started to click the new line and then the old line, instead of the old line and then the new line. As long as I click on the lines in the order I draw them, it works fine. Thank you very much!