Fixes a bug in which the text extracted is "<root></root>"