Added fix for redirects