Fixed XML handling