Fixed bugs in transaction events handling