Environment selection fix