fix lexer infinite loop