     @inPorts.in.on "disconnect", =>
       @outPorts.out.disconnect() if @outPorts.out.isAttached()
 
+      @groups.pop() if @tag?
+
       log.push @cache
       count--
       flush() if count is 0

        for own key, value of opts
          options[key] = value

    @inPorts.in.on "connect", =>
      count++
      @cache = []
      @groups = []

    @inPorts.in.on "begingroup", (group) =>
      here = @locate()

  entire stream is complete."

  constructor: ->
    @tag = null

    @inPorts =
      in: new noflo.Port
      options: new noflo.Port
      tag: new noflo.Port
    @outPorts =
      out: new noflo.Port

