fixing environment manager