fix issue with char count