Fixed issue with redirects