Make global variable local. Thanks for the catch, @linh.