fix err string and fix delete_buf