Fixed bug related to statistics