Minor fixes to make uploading work.