Fixed invalid reference to event publish variable.