fix redirect problem.