fix upload_raw