fixed sqlite3 compatibility