Fixed bugs due to type conversion (String, char[],
Collection<Character>)