mainly fixes to RawMessage segmentation faults