fix a third case of rule rewriting