fix bug in register method