fixed bug in event list for loop