better redirection support