Fixed type in harvestValue method of Environment class.