Minor bugs in registration