Merge pull request #6137 from hnyman/stats2h