Updated
Fixed division by zero