Fixed an issue with redirecting URLs that shouldn't be