Fixed issue when environments have 1 or zero components on gather.