fix problem on index of event