Fixed bug with expected result type
Fixed bug with sizes on rebalancing