fix some redirect problem