Changed the way to retrieve environment properties.