ensure buf clean