Change global variable to local variable to support multi-users.