Bug fixed in indexing the event