Lexical state switching issue