correct env for threads