bug fixes for access token