Bugfix in registration