Improvements to numeric formatting
Attempted fix for chart-related crash