Redirect loop fix.