Bug fix for non Sqlite3 databases. Oops