flush buffer