Improve update of config