Small global variable fix