fixed #2155 : Resolve the bug of callback methods in plugin.