fix unpack check