fix #218 - open transactions with runtime db, and a unit test to validate