Fix: do not use global variable instead of instance variable.