fix sqlite3 and pg