basic fixes to ext/sqlite3