fix bug of register error