Correctly clear environment