Fix uploading bug