fix some bugs for plugging
fix some bugs for plugin