Fixed issue with getting the token