Fix xml reconstruction