Fixed dead loop on waitUntilNotBusy