fixed zerodivision error