Fixed divide by zero error

Divide by all the zeroes.