Use buf consistently