fix up issue of using global methods(#158)