Fix branch selection