Removed unused function flush_buffer().