fixed messing with passed config object