Fixes to c packing