repair the change branch problem