When you divide a 0 by 0 it will give you NaN. Check the values coming in the denominator is a non-zero value since you are trying to calculate percentage (I Guess).
well then just replace the "delete from array" primitive with a "replace array subset primitive" or better with an inplace structure.
I generally use the following method. 1st one replace the NaN with 0 and the 2nd removes the NaN.