Fix test_registration