 
   startServer: (url) ->
     @endServer url
-    client[url] = new pg.Client url
-    client[url].connect()
+    clients[url] = new pg.Client url
+    clients[url].connect()
 
   endServer: (url) ->
     if url?
-      client[url]?.end()
+      clients[url]?.end()
     else
-      client[url].end() for url in _.keys client
+      clients[url].end() for url in _.keys clients
 
 exports.getComponent = -> new Client


      # Send to error port
      result.on "error", (e) =>
        e.query = query
        unless @outPorts.error.isAttached()
          throw new Error "No error port attached"

        @outPorts.error.send e
        @outPorts.error.disconnect()

      result.on "end", (result) =>
        @outPorts.out.beginGroup token
        if _.isEmpty rows
          @outPorts.out.send null

      @sqls.push data

    @inPorts.in.on "disconnect", =>
      client = clients[@url]
      token = @token
      query = _.flatten(@sqls).join(";\n")

      unless client?
        throw new Error "Server connection has not yet been established"
      unless token?
        throw new Error "Missing token for return connection"
      unless query?
        throw new Error "Missing query to execute"

      result = client.query query

      # Send row forward
      result.on "row", (row, result) =>
