bug fixes to plugin framework.