Fix an issue that token cannot be obtained