fix redirect errors