fixed a bug in the oauth2Driver