remove duplicated keys