Fix the bug with the registration