edit to fix sqlite3 error