fix bug uploading and downloading