[bugfix] avoid using global