Fix new env structure of core