Fixes bug preventing OAuth2 authentications