Fixed redirect loop.