               inRepeater = true
 
           if rule.type == "Hanuman::CalculationRule"
-            self.updateCalculation(rule)
+            self.updateCalculation(rule, $ruleContainer)
           else
             self.checkConditionsAndHideShow(rule.conditions, ancestorId, $ruleContainer, $ruleContainer, inRepeater, matchType, rule)
 


  ## AN May 2020 - Start calculated fields code
  # This method triggers an update of the calculations for the given rule's target question
  updateCalculation: (rule) ->
    parameters = {} # used to store the survey data object passed to the calculated fields expresssion
    $target = $('[data-question-id="' + rule.question_id + '"]').find('.form-control') # the question we are calculating a value for
    $targetRepeater = $target.closest(".form-container-repeater") # the parent repeater of the target, if it exists
    targetType = $('[data-question-id="' + rule.question_id + '"]').data('element-type') # the form control type of the target

    $.each rule.conditions, (index, condition) ->


          # bind conditions based on element type
          # text, textarea, select
          if $conditionElement.length < 2
            self.bindConditions($conditionElement, rule, $ruleContainer)
          # radio buttons
          else
            if $conditionElement.is(":checkbox")
