Hopefully fixing an infinite redirect error