Fixed incorrect parsing of html entities