Fix a bug that caused empty values to be formatted