adding destructor for db closing: #MSG-93 fixed