fixed bug in setToken()