   createComponent: (name, component, metadata, callback) ->
     implementation = component
     unless implementation
-      return callback new Error "Component #{name} not available"
+      callback new Error "Component #{name} not available"
+      return
 
     # If a string was specified, attempt to `require` it.
     if typeof implementation is 'string'
       if typeof registerLoader.dynamicLoad is 'function'
         registerLoader.dynamicLoad name, implementation, metadata, callback
         return
-      return callback Error "Dynamic loading of #{implementation} for component #{name} not available on this platform."
+      callback Error "Dynamic loading of #{implementation} for component #{name} not available on this platform."
+      return
 
     # Attempt to create the component instance using the `getComponent` method.
     if typeof implementation.getComponent is 'function'
       try
         instance = implementation.getComponent metadata
       catch e
-        return callback e
+        callback e
+        return
     # Attempt to create a component using a factory function.
     else if typeof implementation is 'function'
       try
         instance = implementation metadata
       catch e
-        return callback e
+        callback e
+        return
     else
       callback new Error "Invalid type #{typeof(implementation)} for component #{name}."
       return

    return true if typeof cPath is 'object' and cPath.processes and cPath.connections
    return false unless typeof cPath is 'string'
    # Graph file path
    cPath.indexOf('.fbp') isnt -1 or cPath.indexOf('.json') isnt -1

  # Load a graph as a NoFlo subgraph component instance
  loadGraph: (name, component, callback, metadata) ->
    @createComponent name, @components['Graph'], metadata, (err, graph) =>
      return callback err if err
      graph.loader = @
      graph.baseDir = @baseDir
      graph.inPorts.remove 'graph'
      graph.setGraph component, (err) =>
        return callback err if err
        @setIcon name, graph
        callback null, graph
      return

    return '' unless name
    return '' if name is 'noflo'
    name = name.replace /\@[a-z\-]+\//, '' if name[0] is '@'
    return name.replace /^noflo-/, ''

  # Get the list of all available components
  listComponents: (callback) ->
