Fixed an issue with getting the access token that caused the program to crash