[FIX] Fixing some div-by-zero issues.