fix set branch bug