fix for cocoon and create indexes for event/stage