segmentation fault in packet constructor, changed type defs to strings instead of chars