bug fix for balance