     waitDuration = ms(waitDuration.toString()) || @browser.waitDuration
     timeoutOn = Date.now() + waitDuration
 
-    lazy = lazyPromise((resolve, reject)=>
+    lazy = new LazyPromise((resolve, reject)=>
 
       # Someone (us) just started paying attention, start processing events
       ++@waiting

{ Promise }       = require("bluebird")


# Returns a Bluebird promise that evaluates only when registering a callback
# (via then, catch, done, etc).
#
# Takes the same resolver as new Promise()
lazyPromise = (resolver)->
  deferred = new Promise.defer()
  resolved = false
  promise  = deferred.promise
  promise._setProxyHandlers = (args...)->
    Promise.prototype._setProxyHandlers.apply(promise, args)
    if !resolved
      resolved = true
      resolver(deferred.resolve.bind(deferred), deferred.reject.bind(deferred))
  promise._addCallbacks = (args...)->
    Promise.prototype._addCallbacks.apply(promise, args)
    if !resolved
      resolved = true
      resolver(deferred.resolve.bind(deferred), deferred.reject.bind(deferred))
  return promise


# The browser event loop.

      )

      finalized = work.finally(=>

        clearInterval(timer)
        @removeListener("tick", ontick)
        @removeListener("done", ondone)
