fix regist bugs