fix bug when get token failed