FredrichO/AkifH - fixing divide by zero bugs.