fix for injected elements before char count