Fixed division by zero exceptions.