Fixed a redirection bug