Fix template rules.