Correct displaying states status and avoid divison by zero due to wrong data collected