Support for plugin_cleanup func