Fixed a bug in redirect support