correct redirection bug