bugfix destroying the plugin