Added workaround for BS4/HTML5lib bug