Backported environment config setting from master