small fix in counterbalancing code

...wing new condition