Fixed bug for taking the correct value in the proccessRules method