another fix in computing imbalance