Fix character counting.