Find the current branch correctly