fix a redirection bug