fix registering