fixed bugs in lex file