Fixed env bug