added safety check around PluginGlobal::Event()