Fix a redirect loop