          self._sent[child].dep = label
          cdef int i
          if child > head:
              self._sent[head].r_kids += 1
              self._sent[head].r_edge = child
              i = 0
              while self.has_head(head) and i < self.length:
                  self._sent[head].r_edge = child
                  head = self.H(head)
                  i += 1 # Guard against infinite loops
 
</s> remove                 self._sent[head].r_edge = child
 </s> add 
            # Some transition systems can have a word in the buffer have a
            # rightward child, e.g. from Unshift.
            self._sent[head].r_edge = self._sent[child].r_edge
          self._sent[child].dep = label
          cdef int i
          if child > head:
              self._sent[head].r_kids += 1
            # Some transition systems can have a word in the buffer have a
            # rightward child, e.g. from Unshift.
            self._sent[head].r_edge = self._sent[child].r_edge
              i = 0
              while self.has_head(head) and i < self.length:
                  self._sent[head].r_edge = child
                  head = self.H(head)
                  i += 1 # Guard against infinite loops
keep keep keep keep replace keep keep keep keep keep
 * Bug fixes to edge calculation 
spacy/syntax/stateclass.pyx