handle envs correctly