fix issue with TryGetEnvironmentVariables api