         else
           @_kiteChannels[kiteId] = kiteChannelId
           callback null, kiteChannelId
-    
+
     JAccount::tellKite = do->
       {Scrubber, Store} = bongo.dnodeProtocol
 
       localStore = new Store
       remoteStore = new Store
-      
+
       transports = {}
-      
+
       changeTransport = (channelId, {transport})->
         log 'CHANGING TRANSPORT: ', transport
         transports[channelId] = transport
-      
+
       resetTransport = (channelId)->
         delete transports[channelId]
-      
+
       getCommandFailover =(secretChannelId, options, callback)->
-        count = 0
+
+        options.callbackCount or= 0
+
         kallback = __utils.getCancellableCallback callback
         kanceller = __utils.getCancellableCallback =>
           kallback.cancel()
           resetTransport(secretChannelId)
-          if count++ < 10
+          if options.callbackCount++ < 10
             @tellKite options, callback
           else
             callback new Error "Couldn't connect to backend"

        else
          nonces = nonces.concat moreNonces
        callback nonces
    
    fetchNonce = (callback)->
      nonce = nonces.shift()
      if nonce? then callback nonce
      else fetchNonces -> fetchNonce callback
    
    JAccount::fetchNonce = fetchNonce
    
    JAccount::fetchKiteChannelName = (kiteId, callback)->
      @_kiteChannels or= {}
      kiteChannelId = @_kiteChannels[kiteId]

AccountMixin = do ->

  init:(api)->
    {JAccount, JGuest} = api

    JGuest::fetchNonce = ->

    nonces = []

    fetchNonces = (callback)->
