Fixed branch selection problem