determine default branch correctly