Fixes to sqlite3