Fixed a bug with self-registration.

A bug in self-registration broke self-registration for a while.

Closes #603