Fixed global variable deprecation warnings