fix some error while getting token