Make the config handling more resilient.