fix balance calculate