Dispose properly of the plugin.