                             queryEl.c "item", item
                         iq = @makeIq("result", stanza.attrs.to, stanza.attrs.from, id)
                             .cnode(queryEl)
-                            .root()
-                        @emit "stanza", iq
+                        @emit "stanza", iq.root()
             else
                 @emit "got-stanza", stanza

    send: (data) ->
        stanza = if data instanceof ltx.Element then data else ltx.parse data
        switch stanza.name
            when "iq"
                stanza.attrs.should.have.property "from"
                stanza.attrs.should.have.property "to"

                                var: feature
                        iq = @makeIq("result", stanza.attrs.to, stanza.attrs.from, id)
                            .cnode(queryEl)
                        @emit "stanza", iq.root()
                    if stanza.getChild("query", "http://jabber.org/protocol/disco#items")? and stanza.attrs.to of @disco.items
                        items = @disco.items[stanza.attrs.to]
                        queryEl = new ltx.Element("query", xmlns: "http://jabber.org/protocol/disco#items")
