More XML fixes