fixed wait_task_completion after switching to named indexes.