corrected a global variable