error correction for pickle