Fixed bugs with the lexer which resulted in broken tests.