Global variable declaration fix