Handle redirect a bit better.