fix worker termination in rebalance tests