fix to handle XHTML