Bug fixes for plugin framework.