Correctly insert variable in rule’s command