fix issue with redirects