bugfix in formatNumber