fix packing bug