fixed a bug related to copying configs