bug fixes to oauth