Fix data packing in addFunc