fix divide by zero