fixed bad percentage math