small buf fixes