fixing index for events.