fix some buf