Fix error when loading xml string, replaced by input stream.