         else
             @logger.error 'Failed to load Me...' + data.error
 
-    _onTeams: (data, headers) =>
+    _onTeams: (data, headers, params) =>
         if data && not data.error
             @teams = data
             @emit 'teamsLoaded', data

        @logger.info 'Loading ' + uri
        @_apiCall 'GET', uri, null, @_onTeams

    loadUsersList: ->
        # Load userlist
        uri =  "/users?per_page=200&in_team=#{@teamID}"
        @logger.info 'Loading ' + uri
        @_apiCall 'GET', uri, null, @_onProfiles
        @logger.info 'Loading ' + uri
        uri = "/users/me/teams/#{@teamID}/channels"
        @_apiCall 'GET', uri, null, @_onChannels



            @logger.error 'Failed to get subscribed channels list from server: ' + data.error
            @emit 'error', { msg: 'failed to get channel list'}

    _onPreferences: (data, headers, params) =>
        if data && not data.error
            @preferences = data
            @emit 'preferencesLoaded', data
