Fix registered type crash