fix register fail bug