Fixed a bug in deserializePacket()