fix for grammars with more than 256 rules