PENDING: fix buf