fix some global var access (thanks to lualint)