remove duplicate key in dict