fix of division by zero

Signed-off-by: Tim Traver <ttraver@mivamerchant.com>