Fixes for SQLite