Fixed a critical error in data packing code;
Fixed int packing logics