     @_closeAfterRequest = true
 
     if @db isnt null
+      if @collection.object isnt null
+        @collection = name: null, object: null
+
       @db.close()
       @db = null
-
-    if @collection.object isnt null
-      @collection = name: null, object: null
 
     @
 

  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?


    after = (->) if after is null

    @getInstance table, (collection) =>
      collection.count params, (error, results) =>
        if error
          console.log 'Error with fetching counts: ' + error
