Add waitTillAllDone stuff