   ###
   Returns the promise object of this Deferred.
   ###
-  promise: ->
+  promise: =>
     @_promise or= new Promise(this)
 
   ###

  Notify progress callbacks with additional context. Works the same way as notify(),
  except this is set to context when calling the functions.
  ###
  notifyWith: (context, args...) ->
    return this if @_state != 'pending'
    @_progressCallbacks?.forEach (fn) ->
      fn.apply(context, args)

  ###
  Add progress callbacks to be fired when using notify()
  ###
  progress: (args...) =>
    return this if args.length == 0 or @_state != 'pending'
    functions = flatten(args)
    @_progressCallbacks or= []
