fix balance bug