Minor bugfix

Fixed a small typo in the rule check. Used the wrong variable, but with
the correct results. Now it uses the correct variable.