clean buf