         @_datasetsById[id]
 
     _toQuery: ->
-      return @_pending if @_pending?
+      return @_pending() if @_pending()?
       result = $.extend({}, @query.serialize())
       datasets = [@focus()].concat(@datasets())
       ids = (ds?.id ? '' for ds in datasets)

        write: @_fromQuery
        owner: this
        deferEvaluation: true

    _computeAllReadyToDownload: ->
      return false for ds in @accessDatasets() when !ds.serviceOptions.readyToDownload()

          datasetIds = datasetIdStr.split('!')
          focused = !!datasetIds[0]
          datasetIds.shift() unless focused
          @_pending(value)
          DatasetsModel.forIds datasetIds, @query, (datasets) =>
            @_pending(null)
            pending = @_pendingAccess ? {}
            for dataset, i in datasets
              query = value["p#{i}"]
