Fixed a bug in branch configuration selection