Clone settings to avoid pass-by-ref problems.