fix 0 division error