casting to BasePlugin instead of the plugin interface