Fix infragrammar to use set_mode