Enhance Env detection