fix unpack bug