Fix. use/create incorrect global variables.