redirection bug fix