Merge pull request #674 from apache/SCB-2044

SCB-2044 Fixed the Environment class instance thread issue