fix add-buf command and others