Corrected error with environment setting and names