attempting to fix redirect loop