Fix bug in broken branch selector