Remove duplicated characters