Corrected environment calculation