fix logging bug divide by zero