Chanage to globals

Change-Id: Ic3caf057cb9995099df2b3b52358c9330ec78f7f
(cherry picked from commit d2e95f1af0cbaf12aba41981b4754af39ce7bfea)