fixing issue with unterminated entity reference