fix some redirect_to bugs