added wait for empty queue back to toolchange