fixing an issue when environment isn't set