Fix redirect loop.