fix a bug with config upgrade