Fix #829 - Update character counter with correct lengths