fix for redirects