fix balance check