Store env variable in a static variable instead

Change-Id: I5d6067806645722faac3fe90cbec01b6963f7283