Fix services rule generation