The packet type is getting corrupted on the sent packet, changed the way the memory is copies in constructPacket to fix