repairs so OAuth flow doesn't get stuck after error