fix for setToken method