modify checkbalance condition