Fixed a bug in registrations