Fix infinite redirect.