Fixes to upload/download