Fix two bugs for XHTML5 validation