Scala XML conversion bug fix