fix hang in saes by counting available workers after wait