fix bug of register