fixed the tree intersecting the lines outside the line segments glitch