Cleanup for plugins.