Fix process and output order.
Fix process and output order.