         after parseInt results, 10
 
   save: (table, params, after = ->) ->
-    @getInstance table, (db, collection) =>
+    @getInstance table, (collection) =>
       try
         params._id = ensureObjectId params._id if params._id?
       catch exception

  find: (table, params, options, after) ->
    [params, options, after] = @_normalizeArguments params, options, after

    @getInstance table, (db, collection) =>
      try
        if params?._id?
          if isObject(params._id) and params._id.$in?

  getInstance: (table, after) ->
    throw new Error 'The database name must be configured (options.db)' unless @options.db?

    if @db isnt null and @db.state is 'connected'
      @getCollection table, after
    else
      instance = new Db @options.db, new Server @options.host, @options.port, {}

