                   if groupLength is requiredLength
                     data = (_wp(scope).groupedData[key].splice i, 1)[0]
                     # Strip port name if there's only one inport
-                    if inPorts.length is 1 and inPort.isAddressable()
+                    if config.inPorts.length is 1 and inPort.isAddressable()
                       data = data[port]
                     groups = (_wp(scope).groupedGroups[key].splice i, 1)[0]
                     if collectGroups is true

              closeGroupOnOuts payload
            # Disconnect
            if _wp(scope).groupBuffers[port].length is 0
              if inPorts.length is 1
                if config.async or config.StreamSender
                  if config.ordered
                    _wp(scope).outputQ.push null

  if collectGroups isnt false and config.group
    collectGroups = true

  for name in config.inPorts
    unless component.inPorts[name]
      throw new Error "no inPort named '#{name}'"
  for name in config.outPorts
    unless component.outPorts[name]
      throw new Error "no outPort named '#{name}'"

  disconnectOuts = ->
    # Manual disconnect forwarding
    for p in config.outPorts
      component.outPorts[p].disconnect() if component.outPorts[p].isConnected()

  sendGroupToOuts = (grp) ->
    for p in config.outPorts
      component.outPorts[p].beginGroup grp

  closeGroupOnOuts = (grp) ->
    for p in config.outPorts
      component.outPorts[p].endGroup grp

  # Declarations
