fix unloading of plugin