update:
- remove dead code.
- check for a possible division by zero.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>