Fixed error where IC 'add' was written as 'sum' in array index calculation