sorted redirection bug