Fixes bug with number formatting function.