fixing division by zero case
so embarrassing