fix procedure order.