Changed method order in register() method