added __attribute__((packed)) to ref chan