fixed a bug with sharing a sqlite3 connection between processes