handle redirects better.