Fixed division by zero error