Fixes issue with bad 302 redirects