fix another divide by zero bug