Fix bug: missing global variable.