Fixes to upload and SQLite3 support