Fix code dealing with the PluginContext.