bug fix divisible by zero