fix data packing