Added support for multiple instances of the plugin