Protect against potential divide by zero detected by static analysis