             'registeredFrom.country' : country
 
         user.update locationModifier, ->
-          _queue.next()
+          queue.next()
 
       ->
         JUser.persistOauthInfo username, client.sessionToken, (err) ->
           return callback err  if err
-          _queue.next()
-
-      ->
-        return _queue.next()  unless username?
+          queue.next()
+
+      ->
+        return queue.next()  unless username?
 
         _options =
           account        : account

      callback null, { user, account }


  updateUserInfo = (options, queue, callback, fetchData) ->

    { user, ip, country, region, username, client, account, clientId } = options

    _queue = [

      ->
        # updating user's location related info
        return _queue.next()  unless ip? and country? and region?

        locationModifier =
          $set                       :

          queue.next()

      ->
        userInfo = {
          email, username, password, lastName, firstName, emailFrequency
        }
        createUser { userInfo }, (err, data) ->
          return callback err  if err
          { user, account } = data
          queue.next()

      ->
        params = {
          user, ip, country, region, username, client, account, clientId
        }
        updateUserInfo params, (err, newToken_) ->
          return callback err  if err
          newToken = newToken_
          queue.next()

      ->
        updateAccountInfo { account, referrer, username }, queue, callback
