update library
Fix a bug in the format code