Make sure to copy the config before modifying it.