diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index a19179d..755fc47 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -178,13 +178,13 @@ static int set_system_infos(struct gsm_bts_trx *trx)
 
 	for (n = 0; n < n_si; n++) {
 		i = gen_si[n];
-		bts->si_valid |= (1 << i);
 		/* Only generate SI if this SI is not in "static" (user-defined) mode */
 		if (!(bts->si_mode_static & (1 << i))) {
 			rc = gsm_generate_si(bts, i);
 			if (rc < 0)
 				goto err_out;
 			si_len[i] = rc;
+			bts->si_valid |= (1 << i);
 		} else {
 			if (i == SYSINFO_TYPE_5 || i == SYSINFO_TYPE_5bis
 			 || i == SYSINFO_TYPE_5ter)
@@ -198,10 +198,10 @@ static int set_system_infos(struct gsm_bts_trx *trx)
 
 	/* Third, we send the selected SI via RSL */
 
-	for (i = SYSINFO_TYPE_1; i < _MAX_SYSINFO_TYPE; i++) {
+	for (n = 0; n < n_si; n++) {
+		i = gen_si[n];
 		if (!(bts->si_valid & (1 << i)))
 			continue;
-
 		rc = rsl_si(trx, i, si_len[i]);
 		if (rc < 0)
 			return rc;
