Updated converter to add leading zeros