fixed the environment bug in windows