Fixes bug in calculating stats where the saved values was a string