narrowed down to a problem with struct packing