Fixed the infinite redirect.