bug with redirects