fix redirect problem