rebalancer bug fix