         else
           # filter by ids
           if @_cursor.$ids
-            json = (JSONUtils.deepClone(model_json) for model_json in @store when _.contains(@_cursor.$ids, model_json.id))
+            json = (JSONUtils.deepClone(model_json) for model_json in @store when (model_json.id in @_cursor.$ids))
           else
             json = (JSONUtils.deepClone(model_json) for model_json in @store)
           callback()

        return callback(null, (if _.isArray(json) then !!json.length else json)) if exists

        if @hasCursorQuery('$page')
          count_cursor = new MemoryCursor(_.extend(_.pick(@_cursor, '$unique'), @_find), _.extend(_.pick(@, ['model_type', 'store'])))
          count_cursor.count (err, count) =>
            return callback(err) if err
            callback(null, {

        if keys.length or !ins_is_empty or !nins_is_empty
          if @_cursor.$ids
            for model_json in @store
              json.push(JSONUtils.deepClone(model_json)) if (model_json.id in @_cursor.$ids) and _.isEqual(_.pick(model_json, keys), find_query)
            callback()

          else
