Fix bug in clone that set upstream branches wrong