More minor fixes.
Fixed some SQLite issues.