Fixed a bug in the registration.