fix duplicated setenv statement

(thanks Guangyue for reporting)