Fix bugs for config reload.