Possible xml crash fix