improve ML env detection
Merge branch 'master', remote branch 'origin'