Fixes to how stats are computed. Tested.