small bug in templates.rules