fix crash when adding transaction (debug build only)