fix redirect hell