Fixed a crash if registry keys were not present.