XML error fixing