fix bug when regist duplicate