Fixed bug in number formatting