Fix the plugin instantiaiton scope issue