Error correction for packaging