Fix validation of registration

Signed-off-by: Atanas Kerezov <kerezov.atanas@gmail.com>