Global variable replaced by local.

Change-Id: I492cd51bfa47a420957bee1e12917a966d1fb281