Fix stream mode for grammars.