fixed bugs related to 0-fill and leading 0 in %#o formats