changed update config code.