fixing bug when the outside env variable doesn't exist