Fixed checking the running condition of statistic dialog.