               parseParent.start.prev.append newParse
               newParse.container.end.append parseParent.end.next
 
-              newParse.parent = newParse.start.parent = newParse.end.parent =
+              newParse.container.parent = newParse.parent = newParse.container.end.parent =
                 parseParent.parent
 
-              newParse.notifyChange()
+              newParse.container.notifyChange()
 
               @addMicroUndoOperation new ReparseOperation parseParent, newParse.container
 

          persistentParent = @textFocus.parent.parent

          chars = getCharactersTo persistentParent, head.container.start
          @setTextInputFocus null
          socket = getSocketAtChar persistentParent, chars
        else

    head = parent.start
    charsCounted = 0

    until charsCounted >= chars and head.type is 'socketStart' and
        (head.next.type is 'text' or head.next is head.container.end)
      if head.type is 'text' then charsCounted += head.value.length

      head = head.next
