improve automatic redirects