fixed XML entity parsing