added check vars before lexical analysis
small fix
regex fix