Fixing XML entity validation errors