Fixed registration

Fixes #4.