fix buf type