Fix edge case in onTransactionIdle()