Correct the code that calculates over arrays of 0