prevent error upon switch grammar.