fix resolving redirects