Fixed char count bugs