doubt, shall have jurisdiction to make such order and give such directions as to the institution or prosecution of the proceeding as may be necessary to meet the case, and any proceeding or step in a proceeding taken in accordance with any such order or direction, shall be deemed to be regular and sufficient.