fixed env bug