fix upload and download