fix the events publishing script after the publish operation change