Fix redirection deprecation warnings