Packet format fix. Pad message until length is a multiple of 4. Some code