Fix nullbyte bug & treatment of headers in HTML