DM SQLite backend, some bug fixes