embed a pointer to a DB instead of the DB, avoids a data race caused by copying mutexes, fixes #41