Fixed bug when requesting access token and URL has bad query params.