More discriminate env setting