             output.writeByte(flags);
 
         if (body != null)
-            output.writeObject(body);
+            writeExternalBody(output);
 
         if (clientId != null && clientIdBytes == null)
             output.writeObject(clientId);

            if (i == 0)
            {
                if ((flags & BODY_FLAG) != 0)
                    body = input.readObject();
                else
                    body = null; // default body is {} so need to set it here
        
                if ((flags & CLIENT_ID_FLAG) != 0)
                    clientId = input.readObject();
        

        }

        return result;
    }

    /**
     * @private
     */
    protected function readExternalBody(input:IDataInput):void
    {
        body = input.readObject();
    }

    /**
