tweak environment detection