fix parameter ordering when calling various do_ functions