corrects divide by zero