Fixed missing global statement