Fix format of stats
Merge other fixes