fix buf in add_facts