     inSockets = {}
     callback null, received
     network.removeListener 'process-error', onError
+    return
   network.once 'end', onEnd
   # Start network
   network.start (err) ->
-    return callback err if err
+    if err
+      callback err
+      return
     # Send inputs
     for inputMap in inputs
       for port, value of inputMap

    network = new Network graph, options
    # Wire the network up and start execution
    network.connect (err) ->
      return callback err if err
      callback null, network

# ### Network execution
#

sendOutputMap = (outputs, resultType, options, callback) ->
  # First check if the output sequence contains errors
  errors = outputs.filter((map) -> map.error?).map (map) -> map.error
  if errors.length
    callback normalizeOutput errors, options
    return

  if resultType is 'sequence'
    callback null, outputs.map (map) ->
      res = {}
      for key, val of map
        if options.raw
