 
     # Remove the handler from proto when callback is called.
     # This is required to prevent unused callbacks to consume memory.
-    if callback
+    if cb
       # id of the last callback function
       id = Number(Object.keys(scrub.callbacks).last)
       # original handler

      else
        @emit "connectionFailed"

  ready: (callback)->
    return KD.utils.defer callback  if @readyState
    @once 'ready', callback

    @initBackoff options  if @autoReconnect

    @handlers =
      log   : (options, cb)-> log options.withArgs
      alert : (options, cb)-> alert options.withArgs

    @proto = proto @handlers
    @proto.on 'request', (req)=>
