Add unpack error control