added fix for env directory clean up