fixed data allocation in constructor by copying size +1 to all parts of the packet