fixed statistics bug