buffer flush