Fixed leaks in lexer