Fixed bug where xml was UTF-16 rather than UTF-8