Tried to fix redirect loop