make sure workers are terminated before the next one starts