fixed bugs in number formatter
closes #99