Corrected an issue when reading env vars