lexer fixes to parse closing tags properly