Fix shallow copy of config