Fix a bug with formatn