Fixed division by zero errors.