Fix bug ArithmeticException (divide 0)