Adjust templates to correctly configure rules