Fixed a problem with registering.