fixed ZeroDivision bug