             assert(v.isIntersection)
             let r = list[elementIndex]
             // insert v in the list
-            v.setPreviousVertex(r.previous, transition: r.previousTransition)
+            v.setPreviousVertex(r.previous)
             v.setNextVertex(r.next, transition: r.nextTransition)
             v.previous.setNextVertex(v, transition: v.previous.nextTransition)
-            v.next.setPreviousVertex(v, transition: v.next.previousTransition)
+            v.next.setPreviousVertex(v)
             // replace the list pointer with v
             list[elementIndex] = v
         }

            let element1 = element.split(from: t0, to: t)
            let element2 = element.split(from: t, to: t1)
            // insert the vertex into the linked list
            v.setPreviousVertex(start, transition: VertexTransition(curve: element1.reversed()))
            v.setNextVertex(end, transition: VertexTransition(curve: element2))
            start.setNextVertex(v, transition: VertexTransition(curve: element1))
            end.setPreviousVertex(v, transition: VertexTransition(curve: element2.reversed()))
        }
        
        assert(v.isIntersection)

    public private(set) var next: Vertex! = nil
    public private(set) weak var previous: Vertex! = nil
    public private(set) var nextTransition: VertexTransition! = nil
    
    public func setNextVertex(_ vertex: Vertex, transition: VertexTransition) {
        self.next = vertex
        self.nextTransition = transition
    }
    
    public func setPreviousVertex(_ vertex: Vertex) {
        self.previous = vertex
    }
    
    init(location: CGPoint, isIntersection: Bool) {
