Fix API xml encoding problem