fix environment bug on Windows