fix disconnect while uploading