fixed issue with redirects