Added bug fixes to plugin framework.