really did fix the redirect loop this time