     unless Types.isArray(deps)
       deps = [deps]
     if callback
-      callback = bindMeteor(callback)
+      callback = Meteor.bindEnvironment(callback)
     promises = _.map deps, (name) => @_getDeferred(name).promise
     log('Waiting for dependencies', deps)
     promise = Q.all(promises)
-    promise.then bindMeteor (results) ->
+    promise.then Meteor.bindEnvironment (results) ->
       log('Dependencies resolved', deps, results)
       if callback
         callback.apply(null, results)

    promise

log = -> console.log.apply(console, arguments) if Depends.debug
bindMeteor = -> Meteor.bindEnvironment.apply(Meteor, arguments)

      deps = []
    isCallback = Types.isFunction(value)
    if isCallback
      value = Meteor.bindEnvironment(value)
    df = @_getDeferred(name)
    if Q.isFulfilled(df.promise)
      throw new Error('Dependency with name "' + name + '" already defined.')
    log('Defined dependency', name, deps)
    @on(deps).then(
      Meteor.bindEnvironment (depsResult) ->
        value = if isCallback then value.apply(null, depsResult) else value
        Q.when(value).then(
          Meteor.bindEnvironment (valueResult) ->
            log('Resolved dependency', name, valueResult)
            df.resolve(valueResult)
          df.reject
