fix crash, when called before the first transaction is created