Changed the registration logic