Prevent division by zero
Merge pull request #3472 from Dmitry-Me:preventDivByZero