optimize: change env init order