FIX:bug in register.