Fixed isVariable and isConstant in RuleHandler