Fixed unit tests in register.