Bug fix for token fetch