Fix broken service rule generation