fixed bug with compatibility of sqlite3