Fix error when no matching branches to list