fixes for auth code