fixed typo bug in global.cpp