seems I should move 'transaction' stuff inside InitEventsTable().