Fix unexpected global variable