fix bug illegle code regist