fix loop waitForNewEventLogs