Fixed crash while uploading