Rename buf to peek_buf