Fixed bug that stats buckets are undefined.