attempt to fix recursive redirects