Fixed iterating wrong environments