Fix error while sending xml