fix mistype, add test for dublicate check