fixes a bug in the lexer