Fixed bug in redirects