fix wrong character count when no text is entered