Fix sending of malformed XML