Fix stats gathering.