issue #43: fixed segfault when flushing transactions (thanks, Joel
Jacobson)