fix upload errors