NOT environment detection fix