Fixed a bug where branch was incorrect when wc has multiple branches