Buf fix

Fixed an important bug