Fix bug of index for event