buf fixes