Environment bug fix