more fixes in upload and download calls