small bug fix and thread priority
Slight reverting in EnvironmentConf