Fix buggy lex script