Fix character count bug