Added Flush handling.