Fix error on redirects.