$title isn't set anywhere.

You could create the get_rule_id function in this PR and fetch the rule id here to make sure it matches.