Fix exception thrown when no values are set in the registry.