fix a env change bug