flushing buffer after head section