Fixes to SQLite3 support - propalby fixed bug with database schema changed