Fixed a bug with formatting digits less than 16.