       return
 
     # Empty network, no need to connect it up
-    return networkReady network if graph.nodes.length is 0
+    if graph.nodes.length is 0
+      networkReady network
+      return
 
     # Wire the network up and start execution
     network.connect (err) ->
-      return callback err if err
+      if err
+        callback err
+        return
       networkReady network
-
-  network
+      return
+    return
+  return network
 
 # ### Starting a network from a file
 #

    options.subscribeGraph = false

  exports.graph.loadFile file, (err, net) ->
    return callback err if err
    net.baseDir = options.baseDir if options.baseDir
    exports.createNetwork net, options, callback

# ### Saving a network definition
#
# NoFlo graph files can be saved back into the filesystem with this method.
exports.saveFile = (graph, file, callback) ->
  graph.save file, callback

# ## Embedding NoFlo in existing JavaScript code
#

    deprecated 'Calling noflo.createNetwork without a callback is deprecated'
    callback = (err) ->
      throw err if err
      return

  # Choose legacy or modern network based on whether graph
  # subscription is needed
