Fixed handling exceptions during context registrations