fix bug when working with minified html (case when all head are single line)