removed division by zero issue