fix error for dates less than 10