Fix a div by zero error