fixed zeroDivision error