       if ip.type is 'closeBracket'
         # Bracket closings before data should remove bracket context
         @result.__bracketClosingBefore = [] unless @result.__bracketClosingBefore
-        context = @nodeInstance.getBracketContext(port, @scope, idx).pop()
+        context = @nodeInstance.getBracketContext('in', port, @scope, idx).pop()
         context.closeIp = ip
         @result.__bracketClosingBefore.push context
         continue
       if ip.type is 'openBracket'
         # Bracket openings need to go to bracket context
-        @nodeInstance.getBracketContext(port, @scope, idx).push
+        @nodeInstance.getBracketContext('in', port, @scope, idx).push
           ip: ip
           ports: []
           source: port

          # Don't register ports we're only sending brackets to
          datas = ips.filter (ip) -> ip.type is 'data'
          continue unless datas.length
          console.log context.map (ctx) -> return "#{ctx.source} < #{ctx.ip.data}"
          unforwarded = context.filter (ctx) =>
            return false unless @isForwardingOutport inport, outport
            ctx.ports.indexOf(outport) is -1

    inPort.clear() for inPort in inPorts
    @bracketContext =
      in: {}
      out: {}
    callback = =>
      @started = false
      @emit 'end'
