Corrected flowchart.