Fixed gobal variable definitions.