fixed up some code in oauth