Bug fix - fixed loading global var