Fix config sync problem.

Fixes #6212
Fixes #6242