Remove $global dependency and prevent double assignment